package model;

public class Page {
private int pageSize=4;
private int curPage=10;
private int totalCount;
private int totalPageCount;
private int startPos;

public Page(int curPage, int totalCount) {
	super();
	this.curPage = curPage;
	this.totalCount = totalCount;
}
public int getPageSize() {
	return pageSize;
}
public void setPageSize(int pageSize) {
	this.pageSize = pageSize;
}
public int getCurPage() {
	return curPage;
}
public void setCurPage(int curPage) {
	this.curPage = curPage;
}
public int getTotalCount() {
	return totalCount;
}
public void setTotalCount(int totalCount) {
	this.totalCount = totalCount;
}
public int getTotalPageCount() {
	totalPageCount=(totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize +1);
	return totalPageCount;
}
public void setTotalPageCount(int totalPageCount) {
	this.totalPageCount = totalPageCount;
}
public int getStartPos() {
	startPos=(curPage-1)*pageSize;
	return startPos;
}
public void setStartPos(int startPos) {
	this.startPos = startPos;
}

}
